fix: remove dead audit/graph surface, surface LLM errors, FailOn contract - #32
Merged
Conversation
The WithGraph, WithAuditMode, and WithAuditTargets options configured Reviewer fields (g, audit) that were never read outside NewReviewer, and the internal/graph and internal/audit packages had zero importers. The graph/audit .sight.toml keys fed the same dead chain via ApplyFileConfig. Remove the options, the AuditMode/AuditTarget/AuditTargetType/ AuditOption/ParseAuditMode types, both internal packages, the unused Reviewer fields, the config-file keys, and the stale docs sections. The keys were effectively no-ops, so user-visible behavior is unchanged apart from the removed API. BREAKING CHANGE: public options and types listed above are removed.
Review previously succeeded silently when every provider call failed: errors were collected but only appended to the human-readable Report. Add Stats.LLMErrors (one entry per failed concern call), surface the swallowed self-reflection provider error under an [reflection] prefix, and carry both through ToContractResult into the shared hawk-core-contracts Stats.LLMErrors field so hawk can detect partial results.
…version ToContractResult assigned the contract Result.FailOn field directly, leaving FailOnSet false. The shared contract's Failed() treats an unset threshold as critical, so a user-configured below-critical threshold (WithFailOn(High), the CI preset) was silently ignored at the contract layer. Call SetFailOn during conversion so the configured threshold takes effect.
toPublicFindings silently rewrote out-of-range confidence to a magic 0.6. Extract it as the documented package-level constant defaultConfidence. No behavior change.
- go.mod: hawk-core-contracts v0.1.9 -> v0.1.13-0.20260815203243-0f60bf02 (branch fix/audit-sweep-2026-08 of hawk-core-contracts) — needed for Stats.LLMErrors and Result.SetFailOn/FailOnSet used by this branch; re-pin to the tagged release once hawk-core-contracts#27 merges - go.mod + CI: Go 1.26.6 — 1.26.5 stdlib has reachable vulns that fail govulncheck
contracts#27 squash-merged as 16ebcfd; move from the branch pseudo-version to the merged main pseudo-version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WithGraph/WithAuditMode/WithAuditTargetsoptions and the entirely-unusedinternal/graph+internal/auditpackages (−1,589 lines). Zero workspace importers found.Stats.LLMErrorsand carried into contract results.ToContractResultcallsSetFailOnso user-configured thresholds take effect at the contract layer.